package com.lp.service;

import com.lp.po.Student;

import java.util.Date;
import java.util.List;

/**
 * @author shkstart
 * @create 2021-02-19 22:18
 */
public interface StudentService {
    /*admin身份控制方法*/
    //获取学生总数
    int getCountStudent() throws Exception;
    int getCountStudentByName(String username) throws Exception;
    List<Student> findAll(Integer toPageNo);
    List<Student> findByName(Integer toPageNo,String username);
    Student findById(Integer userid);
    //根据id删除学生信息
    void removeById(Integer userid) throws Exception;
    //根据id个更新学生信息
    void updataById(Integer userid, Student student) throws Exception;
    //注册成功后添加到用户表中
    void inset(Student student);
    //用户端：依据用户名查询用户id
    int findIdByUsername(String username);
    void updateWithPassword(String username,String password);
    Student selectName(String username);

    /*用户身份控制方法*/
    Student findself(String username);






    /*小程序模块*/
    List<Student> wxfindUserBytelnumber(String telnumber,String password);
    List<Student> wxfindUserByusername(String username,String password);
    List<Student> wxfindById(Integer userid);
    int wxRegisterStudent(String username, String telnumber, String password, Date grade);
    List<Student> wxfindCollegeNameWithUserid(Integer collegeid);

    public int setCollegeBySId(Student student) throws Exception;

}
